package com.myc.demo3.teacher.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.myc.demo3.permission.api.PermissionServiceApi;
import com.myc.demo3.teacher.service.PermService;

/**
 * @Description:
 * @Author: mayc
 * @Date: 2020/1/2 10:27
 */
@org.springframework.stereotype.Service
public class PermServiceImpl implements PermService {

    @Reference(version = "1.0", retries = 2)
    private PermissionServiceApi permissionServiceApi;

    @Override
    public String getPermissionByRoleId(String roleId) {
        return permissionServiceApi.getPermissionByRoleId(roleId);
    }

    @Override
    public String getPermById(Long id) {
        return permissionServiceApi.getPermissionNameById(id);
    }
}
